With the basics in mind, you are ready to build any XHTML page. But it's hard to remember all the tags and all of their attributes, much less all the possible values for those attributes. A complete reference for the XHTML language is available at W3Schools.com. W3Schools is a Web site packed full of reference material and tutorials for Web languages. In this class, you will learn XHTML, CSS, and JavaScript, and all three languages have a complete reference (along with tutorials and example code) available at the W3Schools Web site. The W3Schools site is sponsored by the World Wide Web Consortium (W3C), the organization which makes standards for these languages.
So, what does it mean that W3Schools has a complete reference for XHTML? It means that for every XHTML tag, the W3Schools site has at least one page devoted to understanding that tag. That page will include all the attributes (it will even specify which ones are required and which ones are optional) and all the possible values for each attribute. Almost every tag also has demo code that you can manipulate to try it out yourself.
When you need to learn more about a specific tag, simply type its name into the site's search box, and you will be taken either directly to the tag's page or shown options to see the reference, tutorials, or other pages about that tag. Or you can go to http://w3schools.com/tags to see the complete list of tags. Go there now and look at the list. Get a feel for how many you already know. Leave this page open--you will look at it again very soon.
One thing that might be a little confusing: XHTML 1.0 is extremely similar to HTML 4.01, so the references are combined under the name HTML Reference. If you are looking at a reference for an HTML tag, then you are looking at the reference for the XHTML version as well. If there is a difference between any part of the tag in HTML and XHTML, it will be described in the section called "Differences between HTML and XHTML." For an example, look at the <html> tag from the tag list. After you find the difference, go back to the tag list, you will need it again very soon.
The W3Schools will also make note when you are looking at a tag or attribute that is deprecated. A deprecated tag or attribute is one that is being phased out of XHTML in favor of style sheets. Look at the complete list of tags and see how many are deprecated. Avoid using deprecated tags and attributes. In the CSS unit, you will learn about how that functionality is included with CSS.
You may know them as hyperlinks, and that's correct too, but to create hyperlinks in an XHTML documents, you need the anchor tag, <a>, and it's "href" attribute. The name "href" stands for hypertext reference, and the value of this attribute can be either an external URL or the path to a file of the same Web site.
These two options are illustrated below. The first one is an external link. That is, it links to some URL outside of the Web site that this code belongs to. The second is an internal link. That is, it links to another page in the same Web site. Thus it only needs the relative file path.
<a href="http://google.com"> Go to Google</a>
<a href="folderpath/somefile.htm">Go to another page of my site</a>
Add these examples to your template file inside of the paragraph. Remember to use proper nesting and indentation! If you want to include a comment about the difference between the two examples, do so. Save your template with the new examples. I will be looking for this when you turn in your template next week!
Tip: These examples use text as the clickable part of the link. You can also put an image in between the opening and closing tags. Then the image is the clickable part of the link. We will discuss images in detail in a future lesson.
Go to the <a> reference page at the W3Schools. Click on the green "Try it Yourself!" button to look at a working example that you can modify. Try using a different link and test it.